﻿using Coolzon.UI.Core.Parts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.UI.Core
{
    /// <summary>
    /// 事件上下文信息
    /// </summary>
    public class EventContext
    {
        /// <summary>
        /// 触发事件的组件
        /// </summary>
        public Widget Part { get; set; }
        /// <summary>
        /// 事件源名称
        /// </summary>
        public string SourceName { get; set; }
        /// <summary>
        /// 目标场景
        /// </summary>
        public string TargetSceneName { get; set; }
        /// <summary>
        /// 目标框架
        /// </summary>
        public string TargetFrameName { get; set; }
        /// <summary>
        /// 当前场景
        /// </summary>
        public string CurrentSceneName { get; set; }
        /// <summary>
        /// 当前框架
        /// </summary>
        public string CurrentFrameName { get; set; }
        /// <summary>
        /// 参数集合
        /// </summary>
        public Dictionary<string, string> Arguments { get; set; }
        /// <summary>
        /// 数据项相关信息集合
        /// </summary>
        public Dictionary<string, string> Data { get; set; }
        /// <summary>
        /// 事件类型replace or pop
        /// </summary>
        public string ActionType { get; set; }

        public EventContext()
        {
            Arguments = new Dictionary<string, string>();
        }
    }
}